variable "aws_region" {
  description = "AWS region for deployment"
  type        = string
  default     = "us-east-1"
}

variable "image_tag" {
  type        = string
  description = "Git commit SHA or Sequin version tag (e.g. 'v0.9.0')"
  validation {
    condition     = can(regex("^[a-f0-9]{40}$|^v[0-9]+\\.[0-9]+\\.[0-9]+.*|^latest$", var.image_tag))
    error_message = "Must be a 40-character git commit SHA, version starting with 'v' (e.g. v0.9.0), or 'latest'."
  }
}

variable "image_repository" {
  type        = string
  description = "Container image repository URL"
  default     = "sequin/sequin"
}

variable "memory" {
  type        = number
  description = "Memory limit for the container (MB)"
  default     = 2048
}

variable "memory_reservation" {
  type        = number
  description = "Soft memory limit for the container (MB)"
  default     = 1024
}

# Remote state configuration (auto-generated by make command)
variable "infra_state_bucket" {
  type        = string
  description = "S3 bucket for infrastructure state"
}

variable "infra_state_key" {
  type        = string
  description = "S3 key for infrastructure state file"
  default     = "infra/terraform.tfstate"
}

variable "infra_state_region" {
  type        = string
  description = "AWS region for infrastructure state"
}
